<?php

declare(strict_types=1);

use App\Application;
use Core\System\AuthUnit;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
use Hyperf\HttpServer\Router\Router;

Router::addServer(Application::SERVER['JSON_API'], function () {
    //后台在线服务
    Router::get('/admin-api', function () {
        return $data = AuthUnit::permissionsFormData('admin');
    });
});